package com.ts.api.module.channel.entity.qo;

import lombok.Data;

/**
 *  用户查询对象
 */
@Data
public class ChannelUserQO {

    /** 渠道id */
    private Long channelId;
    /** 用户id */
    private Long userId;
    /** 手机号 */
    private String phone;
    /** 手机号MD5 */
    private String phoneMd5;
    /** 起始范围 */
    private Long rangeStartId;
    /** 结束范围 */
    private Long rangeEndId;

    public static ChannelUserQO createUserId(Long userId) {
        ChannelUserQO userBO = new ChannelUserQO();
        userBO.setUserId(userId);
        return userBO;
    }

    public static ChannelUserQO createPhone(String phone) {
        ChannelUserQO userBO = new ChannelUserQO();
        userBO.setPhone(phone);
        return userBO;
    }

    public static ChannelUserQO createPhoneMd5(String phoneMd5) {
        ChannelUserQO userBO = new ChannelUserQO();
        userBO.setPhoneMd5(phoneMd5);
        return userBO;
    }

    public static ChannelUserQO createPhoneMaskRange(String phoneMask, Long rangeStartId, Long rangeEndId) {
        ChannelUserQO userBO = new ChannelUserQO();
        userBO.setPhone(phoneMask);
        userBO.setRangeStartId(rangeStartId);
        userBO.setRangeEndId(rangeEndId);
        return userBO;
    }
}
